﻿using Abp.Domain.Entities.Auditing;
using SingleUserMall.Authorization.Users;
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace SingleUserMall.Sign
{
    /// <summary>
    /// 签到记录
    /// </summary>
    public class Signed : FullAuditedEntity<long>
    {
        /// <summary>
        /// 用户id
        /// </summary>
        public long UserId { get; set; }
        [ForeignKey("UserId")]
        public virtual User User { get; set; }
        /// <summary>
        /// 最近签到日期
        /// </summary>
        public DateTime? SignTime { get; set; }
        /// <summary>
        /// 累计签到天数
        /// </summary>
        public int SignDays { get; set; }
        /// <summary>
        /// 昨日是否签到
        /// </summary>
        public bool IsYesterdaySign { get; set; }
        /// <summary>
        /// 今日是否签到
        /// </summary>
        public bool IsTodaySign { get; set; }
    }
}
